<admintpl file="header" />
<style type="text/css">
.pic-list li {
	margin-bottom: 5px;
}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('AdminData/add',array('id'=>empty($item['id'])?'':$item['id']))}" target="_self">药品数据表内容</a></li>
		</ul>
		<form action="{:U('AdminData/add_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
			<div class="row-fluid">
				<div class="span9">
					<table class="table table-bordered">

                        <tr>
                            <th>内容</th>
                            <td>
                                <script type="text/plain" id="content" name="content">{$item.content}</script>
                            </td>
                        </tr>
					</table>
				</div>

			</div>
			<div class="form-actions">
                <input type="hidden" name="id" value="{$item.id}"/>
				<button class="btn btn-primary js-ajax-submit" type="submit">提交</button>
				<a class="btn" href="{:U('AdminPost/index')}">返回</a>
			</div>
		</form>
	</div>
	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript">
        //编辑器路径定义
        var editorURL = GV.WEB_ROOT;
    </script>
    <script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript">
        $(function() {
            /////---------------------
            Wind.use('validate', 'ajaxForm', 'artDialog', function() {
                //javascript

                //编辑器
                editorcontent = new baidu.editor.ui.Editor();
                editorcontent.render('content');
                try {
                    editorcontent.sync();
                } catch (err) {
                }
                //增加编辑器验证规则
                jQuery.validator.addMethod('editorcontent', function() {
                    try {
                        editorcontent.sync();
                    } catch (err) {
                    }
                    return editorcontent.hasContents();
                });
                var form = $('form.js-ajax-forms');
                //ie处理placeholder提交问题
                if ($.browser && $.browser.msie) {
                    form.find('[placeholder]').each(function() {
                        var input = $(this);
                        if (input.val() == input.attr('placeholder')) {
                            input.val('');
                        }
                    });
                }

            });
            ////-------------------------
        });
    </script>
	</body>
</html>